import React from 'react';
import { FixedSizeList } from 'react-window';
 
const items = Array.from({ length: 1000 }, (_, index) => `Item ${index}`);
 
const Row = ({ index, style }) => (
  <div style={style}>
   <p>{items[index]}</p> 
    <p>{index}</p>
  </div>
);
 
const App = () => (
  <FixedSizeList
    height={400}
    itemCount={items.length}
    itemSize={35}
    width={300}
  >
    {Row}
  </FixedSizeList>
);
 
export default App;